package com.java.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.java.base.DaoSupportImpl;
import com.java.domain.KsDo;
import com.java.service.KsService;

@Service
public class KsServiceImpl extends DaoSupportImpl<KsDo> implements KsService {
	public KsDo queryByname(String name) {
		List<KsDo> list = getSession()
				.createQuery("from KsDo where dname=:dname")
				.setParameter("dname", name).list();
		if (list != null && list.size() > 0) {
			return list.get(0);
		}
		return null;
	}

}
